﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;

namespace Journal.Persistence
{
    class EventPersistenceManager : IEventPersistenceManager
    {

        public void Add(Domain.Event calendarEvent)
        {
            using (ISession session = NHibernateHelper.OpenSession())
            using (ITransaction transaction = session.BeginTransaction())
            {
                session.Save(calendarEvent);
                transaction.Commit();
            }
        }

        public void Update(Domain.Event calendarEvent)
        {
            throw new NotImplementedException();
        }

        public void Delete(Domain.Event calendarEvent)
        {
            throw new NotImplementedException();
        }

        public Domain.Calendar GetById(Guid calendarEventId)
        {
            throw new NotImplementedException();
        }

        public Domain.Calendar GetByTitle(string title)
        {
            throw new NotImplementedException();
        }

    }
}
